﻿@model CNRegex.Web.Models.ModelTutorialTemplate

<link href="@Url.Content("~/Content/css/TutorialTemplate_Introduce.css")" rel="stylesheet" type="text/css" />
<div class="ttl_leftContent">
	@Model.Tutorial.Description
	<ul class="ttl_left_catalog_ul">
		@{
			var level0 =  Model.TutorialCatalog.Where(x=>x.Level==0).ToList();
		}
		@for (int i = 0; i < level0.Count(); i++)
	{
		<li>
			<h2>
				<a href="javascript:void(0)" class="ttl_left_catalog_link" style="color:Black;">
					@level0[i].Name
				</a>
			</h2>
			<div>@level0[i].Description</div>
			@{
		var level1 = Model.TutorialCatalog.Where(x => x.ParentID == level0[i].ID).ToList();
	   }
			<ul class="ttl_left_subCatalog">
				@for (int j = 0; j < level1.Count(); j++)
				{
					<li>
						<a href="/@Model.ExcuteControllerName/@Model.ExcuteActionName/@level1[j].ID">@level1[j].Name</a>
						<div>@level1[j].Description</div>
					</li>
				}
			</ul>
		</li>
	}
	</ul>

</div>
<div class="clear"></div>
